﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace Alfred
{
	class DbConnect
	{
		private string DbHost;
		private string DbName;
		private string DbUser;
		private string DbPass;

		private SqlConnection connection;

		public DbConnect(string h, string n, string u, string p)
		{
			DbHost = h;
			DbName = n;
			DbUser = u;
			DbPass = p;
		}

		public void Connect()
		{
			string s = @"Network Library=DBMSSOCN;Data Source=" + DbHost + ",1433;database=" + DbName + ";User id=" + DbUser + ";Password=" + DbPass + ";";
			connection = new SqlConnection(s);
			connection.Open();
		}
	}
}
